home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Power 1997 December
/
MACPOWER-1997-12.ISO.7z
/
MACPOWER-1997-12.ISO
/
AMUG
/
PROGRAMMING
/
Raven 1.2 Examples.sit
/
Raven 1.2 Examples
/
BoxPaint
/
Source
/
Pane.h
< prev
next >
Wrap
Text File
|
1997-03-09
|
2KB
|
98 lines
/*
* File: Pane.h
* Summary: A pane displaying the 3D object and a 3D cursor.
* Written by: Jesse Jones
*
* Copyright ゥ 1997 Jesse Jones.
* For conditions of distribution and use, see copyright notice in ZTypes.h
*
* Change History (most recent first):
*
* <-> 2/07/97 JDJ Created
*/
#pragma once
#include <QD3D.h>
#include <Z3DView.h>
#include <ZCommander.h>
#include <ZPane.h>
#include "Pencil.h"
//-----------------------------------
// Forward References
//
class CDocument;
class T3DPick;
// ===================================================================================
// class CPane
// ===================================================================================
class CPane : public TPane, public MCommander {
typedef TPane Inherited;
//-----------------------------------
// Initialization/Destruction
//
public:
virtual ~CPane();
CPane(TView* superView);
//-----------------------------------
// New API
//
public:
virtual ulong HandlePick(T3DPick* pickObject);
// Returns the number of hits.
CPencil& GetCursor() {return mCursor;}
T3DView& GetView() {return mView;}
CDocument* GetDoc() {return mDoc;}
//-----------------------------------
// Inherited API
//
public:
static MReanimatable* Create(MReanimatable* parent);
protected:
virtual void OnReanimated();
virtual void OnDraw(TCanvas& canvas, const TRegion& dirtyRgn);
virtual bool OnMouseDown(const TMouseEvent& event);
virtual bool OnAdjustCursor(const TEvent& event);
virtual bool OnKeyDown(const TKeyEvent& event);
virtual bool OnMenuCommand(const MenuCommand& command);
virtual bool OnCommandStatus(const MenuCommand& command, SCommandStatus& status);
//-----------------------------------
// Internal API
//
protected:
virtual void CreateView();
virtual void SubmitScene();
//-----------------------------------
// Member data
//
protected:
CDocument* mDoc;
T3DView mView; // the view for the scene
CPencil mCursor; // The Cursor in Mindblowing 3D!
};